import request from '@/utils/request'

export default {
  // 分页查询banner
  getBannerList(page, limit, params) {
    return request({
      url: `/educms/banneradmin/pageBanner/${page}/${limit}`,
      method: 'get',
      params: params
    })
  },
  
  // 添加banner
  addBanner(banner) {
    return request({
      url: '/educms/banneradmin/addBanner',
      method: 'post',
      data: banner
    })
  },
  
  // 根据id查询banner
  getBannerById(id) {
    return request({
      url: `/educms/banneradmin/get/${id}`,
      method: 'get'
    })
  },
  
  // 修改banner
  updateBanner(banner) {
    return request({
      url: '/educms/banneradmin/update',
      method: 'put',
      data: banner
    })
  },
  
  // 删除banner
  deleteBanner(id) {
    return request({
      url: `/educms/banneradmin/remove/${id}`,
      method: 'delete'
    })
  }
}